<?php
/**
 * Created by PhpStorm.
 * User: Zhanghaiqiang
 * Date: 2020-03-08
 * Time: 22:56
 */

namespace Repositories\Base;


trait CandyRepository
{
    /**
     * @var \Repositories\Candy\ContentRepository
     */
    protected $_candyContentRepo;

    /**
     * @return mixed|\Repositories\Candy\ContentRepository
     */
    public function getCandyContentRepo(){
        if(!$this->_candyContentRepo){
            $this->_candyContentRepo = \App::make('\Repositories\Candy\ContentRepository');
        }
        return $this->_candyContentRepo;
    }

    /**
     * @var \Repositories\Candy\StoryRepository
     */
    protected $_candyStoryRepo;

    /**
     * @return mixed|\Repositories\Candy\StoryRepository
     */
    public function getCandyStoryRepo(){
        if(!$this->_candyStoryRepo){
            $this->_candyStoryRepo = \App::make('\Repositories\Candy\StoryRepository');
        }
        return $this->_candyStoryRepo;
    }

    /**
     * @var \Repositories\Candy\StoryImagesRepository
     */
    protected $_candyStoryImagesRepo;

    /**
     * @return mixed|\Repositories\Candy\StoryImagesRepository
     */
    public function getCandyStoryImagesRepo(){
        if(!$this->_candyStoryImagesRepo){
            $this->_candyStoryImagesRepo = \App::make('\Repositories\Candy\StoryImagesRepository');
        }
        return $this->_candyStoryImagesRepo;
    }

}